// 导入自己封装的axios实例对象
import request from '@/utils/request'

// 获取频道信息
export const getCommentList = params=>{
  return request({
    url:'/v1_0/comments',
    params
  })
}

export const addCommentList = data=>{
  return request({
    url:'/v1_0/comment/likings',
    method:'post',
    data
  })
}
export const deleteCommentList = target=>{
  return request({
    url:'/v1_0/comment/likings/'+target,
    method:'delete'
  })
}

/**
 * 发布文章评论或评论回复
 */
 export const addComment = data=>{
  return request({
    method: "POST",
    url: "/v1_0/comments",
    data
  });
}